Pick up some more missing pieces from jeeps/
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 20 Apr 2006 02:26:00 +0000 (02:26 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 20 Apr 2006 02:26:00 +0000 (02:26 +0000)
gpsbabel/jeeps/gpsserial.c
gpsbabel/jeeps/gpsusbcommon.h [new file with mode: 0644]

index 0496374a6268f15681b41fe639d3c42dae05c6ed..3e586e6d33fbf92dd96675eaf74af203dcb6fc81 100644 (file)
@@ -223,7 +223,11 @@ int32 GPS_Serial_Read(gpsdevh * dh, void *ibuf, int size)
 #include <sys/time.h>
 #include <termios.h>
 #include <unistd.h>
-#include "gpsserial_posix.h"
+
+typedef struct {
+        int fd;                /* File descriptor */
+       struct termios gps_ttysave;
+} posix_serial_data;
 
 /* @func GPS_Serial_Restoretty ***********************************************
 **
diff --git a/gpsbabel/jeeps/gpsusbcommon.h b/gpsbabel/jeeps/gpsusbcommon.h
new file mode 100644 (file)
index 0000000..0293cab
--- /dev/null
@@ -0,0 +1,46 @@
+#if !defined(NO_USB)
+/*
+    Garmin USB layer - OS independent component.
+
+    Copyright (C) 2006 Robert Lipe, robertlipe@usa.net
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+ */
+
+/*
+ * The 'low level ops' are registered by the OS layer (win32, libusb, etc.)
+ * to provide gruntwork features for the common USB layer.
+ */
+typedef int (*gusb_llop_get)(garmin_usb_packet *ibuf, size_t sz);
+typedef int (*gusb_llop_send)(const garmin_usb_packet *opkt, size_t sz);
+typedef int (*gusb_llop_close) (gpsdevh *dh);
+
+typedef struct gusb_llops {
+       gusb_llop_get  llop_get_intr;
+       gusb_llop_get  llop_get_bulk;
+       gusb_llop_send llop_send;
+       gusb_llop_close llop_close;
+} gusb_llops_t;
+
+/* Provided by the common code. */
+void gusb_syncup(void);
+void gusb_register_ll(struct gusb_llops *);
+void gusb_list_units(void);
+
+/* Provided by the OS layers */
+// int gusb_init(const char *portname, gpsdev **dh);
+
+#endif